package com.fowo.api.sys.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler;
import com.fowo.api.sys.model.SysLogData;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.util.Date;

@Data
@Schema(title = "系统日志")
@TableName(value = "sys_log", autoResultMap = true)
public class SysLog {
    @TableId(type = IdType.ASSIGN_ID)
    private Long id;

    private String source;

    private String level;

    private String formattedMessage;

    @TableField(typeHandler = JacksonTypeHandler.class)
    private SysLogData data;

    private Date createTime;
}
